const handleName = ({
  pathName,
  i,
  it,
}: {
  pathName: string;
  i: number;
  it: string;
}) => {
  let key = "",
    routePath = "";
  if (i > 1) {
    key = "menus." + pathName + "." + it;
    routePath = pathName + "/" + it;
  } else {
    key = "menus." + it;
    routePath = "/" + it;
  }

  let comPath = "/src/views/" + pathName + "/" + it + "/index.tsx";
  comPath = comPath.replace(/\/+/g, "/");
  key = key.replace(/\/+/g, "");

  return {
    comPath,
    key,
    routePath,
  };
};
export default handleName;
